import Vue from "vue";
import Router from "vue-router";
import Login from "@/components/Login";
import home from "@/components/home";
import _unit from "@/components/unit";
import station_c from "@/components/station_c.vue";
import allot from "@/components/allot.vue";
import weather from "@/components/weather.vue";
import element_list from "@/components/element_list.vue";
import gateway_list from "@/components/gateway.vue";
import map from "../components/weather_map.vue";
Vue.use(Router);

export default new Router({
  routes: [
    { path: "/", component: Login },
    {
      path: "/home",
      component: home,
      redirect: "/unit",
      children: [
        { path: "/unit", component: _unit },
        { path: "/station_c", component: station_c },
        { path: "/allot", component: allot },
        { path: "/weather", component: weather },
        { path: "/element_list", component: element_list },
        { path: "/gateway_list", component: gateway_list },
        { path: "/map", component: map }
      ]
    }
  ]
});
